<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'searchcuslimi.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link rel="stylesheet" type="text/css" href="<%=basePath%>/css/biaoge.css"/>
  <script type="text/javascript" src="jquery/js/jquery-1.8.2.js"></script>
  </head>
   <script type="text/javascript">
 function ju(){
    window.location="showReport.action";
  }
  function cha(){
 
   window.location="showCustomer.action";
     
  }
  
  function chaxun(){
  var name=$("#uname").val();
   window.location="searchcuslimit.action?username="+name;
 }
  
  function g(){
    window.location="showindustry.action";
  }
  
function quan(){
     window.location="showcuslimit.action";
  }

  function xiu(name){
  if(confirm("确定要修改他的权限吗？")){
  //var name=$("#hid").val();
  var can=document.getElementsByName(name);
  var fen,ping,ju,ding;
  // var fen=can[0].value; var ping=can[1].value;var ju=can[2].value;var ding=can[3].value;
  
  if(can[0].checked) fen=1;else fen=0;
  if(can[1].checked) ping=1;else ping=0;
  if(can[2].checked) ju=1;else  ju=0;//can[2].checked=false;
  if(can[3].checked) ding=1;else ding=0;//can[3].checked=false;  */
  /*
   var fen=$("#fen").val();
   var ding=$("#ding").val();
    var ju=$("#ju").val();
     var pin=$("#pin").val();*/
   //alert(name+","+fen+","+ping+","+ju+","+ding); 
   var tt=name+","+fen+","+ping+","+ju+","+ding;
   window.location='updatelimit.action?quanbu='+tt;
    
   }
  }
  </script>
  <body>
   <%--   您已登录,用户名为：${mana.managersName}<br><br><br>
   <div style=" width:190px; float:left">
   <input type="button" value="举报信息" onclick="ju()"><br><br>
       用户管理
     <div>
  <ul>
  <li><a href="javascript:void(0);" onclick="cha()">查看用户信息</a></li>
  <li><a href="javascript:void(0);" onclick="quan()">查看用户权限</a></li>
  </ul> 
   </div>
   <br>
   <input type="button" value="工厂管理" onclick="g()"><br><br>
   </div>
  </td><td width="5%"></td>
   		<td valign="top"> --%>
   			<div style="width:900px; float:right;" id="chakan">
      <font size="2" color="red">${str}</font><input type="button" value="查询用户" onclick="chaxun()" style="float:right; margin-top: 5px"><input type="text" name="uname" id="uname" style="float:right; margin-top: 5px"><br>
    
    <table id="mytable" cellspacing="10">
    <tr>
  <td>用户名</td>  <td>现有权限(可以勾选进行修改)</td><td>举报失败次数</td><td>被举报次数</td><td>修改权限</td></tr>
  <c:if test="${!empty combin}">
  <tr>
  <td>${combin.username}</td>             
   <td>
  <c:if test="${combin.canshare==1}">
         <input type="checkbox" id="fen" name="${combin.username}"  value="1" checked="checked">分享
  </c:if>
  <c:if test="${combin.canshare==0}">
         <input type="checkbox"  value="0" name="${combin.username}"  >分享
  </c:if>
  <c:if test="${combin.cancomment==1}">
       <input type="checkbox" id="pin" name="${combin.username}"   value="1" checked="checked"> 评论
  </c:if>
  <c:if test="${combin.cancomment==0}">
       <input type="checkbox"  value="0" name="${combin.username}"  > 评论
  </c:if>
  <c:if test="${combin.canreport==1}">
         <input type="checkbox"  name="${combin.username}" value="1"  checked="checked">举报
  </c:if>
  <c:if test="${combin.canreport==0}">
         <input type="checkbox" id="ju" value="0" name="${combin.username}"  >举报
  </c:if>
  <c:if test="${combin.cancustom==1}">
        <input type="checkbox" id="ding" name="${combin.username}"  value="1" checked="checked">定制    
  </c:if>
  <c:if test="${combin.cancustom==0}">
        <input type="checkbox"  value="0" name="${combin.username}" >定制    
  </c:if>
  </td>  
   <td>${combin.reportcount}</td>
   <td>${combin.bereportedcount}</td> 	
   <td> <input type="button" style="border-style:none" value="修改" 
   onclick="xiu('${combin.username}')"></td>
  </tr>
  </c:if>
  
  </table>
  <br>
  
						</div>
   		</td>
   	</tr>
   	
   </table>
  </body>
</html>
